import amesu from "../../../model/bot/amesu";
import func from "../../../model/func";
import { MsgAction, Tpl_guess } from "../../../shared/master/MsgAction";
import { style_default } from "../../../style/default";

export default async function(data:MsgAction){
    let s = new style_default();
    let logs = data.data;
    s.setTitle('金币抽奖','💰');
    s.addLine(`💰花费指定数量的金币,你就可能得到最高百倍的回报哦~`);
    if(logs.length > 0){
        logs.reverse()
        s.setline_Title('全服记录','🔎')
        for (let index = 0; index < 10;index++) {
            const element =logs[index];
            if(!element){
                break;
            }
            s.addLine(`🕐${func.getTimeStr_h(element.time)}${element.name}获${element.duble}倍奖励！`)
        }
    }
    s.setline_Title('启动抽奖','✨')
    s.addLine(`🎉开始抽奖[金币抽奖 + 投入金币数]`);
    amesu.sendText(data.tolocation,s.end());
}